Skip to content

Update the Increase virtual memory page - #9659

Open
yetanothertw wants to merge 1 commit into
mainfrom
9396-vm.max_map_count
Open

yetanothertw wants to merge 1 commit into
mainfrom
9396-vm.max_map_count

Conversation

@yetanothertw

@yetanothertw yetanothertw commented Nov 30, 2026 •

Copy link
Copy Markdown
Member

Summary

Fixes #9396 The old page told package users to use /etc/sysctl.conf, which silently reverts at reboot and on package upgrade. That led to nodes dropping back to the 262144 value and the JVM crashes described in the issue. The package tab now uses the same-name /etc/sysctl.d/elasticsearch.conf, which the lab test showed holds across reboot and upgrade. The false claim is gone.

I've added clearer headings and ordered, scannable steps. The page is now also version aware (advice for 9.6 versions (no user action) + earlier versions).

Preview of the updated page

Generative AI disclosure

  1. Did you use a generative AI (GenAI) tool to assist in creating this contribution?
  • Yes
  • No

Fixes #9396 The old page told package users to use /etc/sysctl.conf, which silently reverts at reboot and on package upgrade. That led to nodes dropping back to 262144 and the JVM crashes described in the issue. The package tab now uses the same-name /etc/sysctl.d/elasticsearch.conf, which the lab test showed holds across reboot and upgrade.
The false claim is gone.
@github-actions

Copy link
Copy Markdown
Contributor

Elastic Docs AI PR menu

Check the box to run an AI review for this pull request.

  • Review docs changes (docs-review). Status: not started.

Powered by GitHub Agentic Workflows and docs-actions. For more information, reach out to the docs team.

@yetanothertw yetanothertw self-assigned this Nov 30, 2026
@yetanothertw
yetanothertw marked this pull request as ready for review November 30, 2026 15:54
@yetanothertw
yetanothertw requested a review from a team as a code owner November 30, 2026 15:54
@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

🔍 Preview links for changed docs

@github-actions

Copy link
Copy Markdown
Contributor

Elastic Docs Style Checker (Vale)

Summary: 1 suggestion found

💡 Suggestions (1): Optional style improvements. Apply when helpful.
File Line Rule Message
deploy-manage/deploy/self-managed/vm-max-map-count.md 16 Elastic.Versions Use 'or later' instead of 'or higher' when referring to versions.

The Vale linter checks documentation changes against the Elastic Docs style guide. To use Vale locally or report issues, refer to Elastic style guide for Vale.

@shainaraskas shainaraskas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a couple of questions about scope - right now, we are missing coverage of a couple of install types. we should either cover them, or scope the page (see the ones mentioning linux up here)

If you installed {{es}} from the [RPM](/deploy-manage/deploy/self-managed/install-elasticsearch-with-rpm.md) or [Debian](/deploy-manage/deploy/self-managed/install-elasticsearch-with-debian-package.md) package on a `systemd`-based distribution, the {{es}} package sets `vm.max_map_count` for you. `systemd` applies the packaged value at every boot, and the package applies it again every time you install or upgrade {{es}}:

* {applies_to}`stack: ga 9.6+` The package sets the value to `1048576`, so you don't need to change anything unless you want a different value.
* In versions earlier than 9.6, the package sets the value to `262144`, which is lower than the recommended `1048576`. To use `1048576`, you must override the packaged value, as described in [Persist the value across reboots and upgrades](#vm-max-map-count-persist).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* In versions earlier than 9.6, the package sets the value to `262144`, which is lower than the recommended `1048576`. To use `1048576`, you must override the packaged value, as described in [Persist the value across reboots and upgrades](#vm-max-map-count-persist).
* {applies_to}`stack: ga 9.0-9.5` The package sets the value to `262144`, which is lower than the recommended `1048576`. To use `1048576`, you must override the packaged value, as described in [Persist the value across reboots and upgrades](#vm-max-map-count-persist).

The recommended `vm.max_map_count` value is `1048576` or higher. If the operating system's default value is lower than `1048576`, configure the `vm.max_map_count` parameter to `1048576`.

On Linux, you can increase the limits of the `vm.max_map_count` parameter by following this step as an account with `root` privileges:
If you installed {{es}} from the [RPM](/deploy-manage/deploy/self-managed/install-elasticsearch-with-rpm.md) or [Debian](/deploy-manage/deploy/self-managed/install-elasticsearch-with-debian-package.md) package on a `systemd`-based distribution, the {{es}} package sets `vm.max_map_count` for you. `systemd` applies the packaged value at every boot, and the package applies it again every time you install or upgrade {{es}}:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be good to give this new content its own heading, because it's not super clear that we have rpm/deb/archive info "forking"

Suggested change
If you installed {{es}} from the [RPM](/deploy-manage/deploy/self-managed/install-elasticsearch-with-rpm.md) or [Debian](/deploy-manage/deploy/self-managed/install-elasticsearch-with-debian-package.md) package on a `systemd`-based distribution, the {{es}} package sets `vm.max_map_count` for you. `systemd` applies the packaged value at every boot, and the package applies it again every time you install or upgrade {{es}}:
## Default virtual memory values
If you installed {{es}} from the [RPM](/deploy-manage/deploy/self-managed/install-elasticsearch-with-rpm.md) or [Debian](/deploy-manage/deploy/self-managed/install-elasticsearch-with-debian-package.md) package on a `systemd`-based distribution, the {{es}} package sets `vm.max_map_count` for you. `systemd` applies the packaged value at every boot, and the package applies it again every time you install or upgrade {{es}}. The value depends on your {{stack}} version:

* {applies_to}`stack: ga 9.6+` The package sets the value to `1048576`, so you don't need to change anything unless you want a different value.
* In versions earlier than 9.6, the package sets the value to `262144`, which is lower than the recommended `1048576`. To use `1048576`, you must override the packaged value, as described in [Persist the value across reboots and upgrades](#vm-max-map-count-persist).

If you installed {{es}} from an archive (`.tar.gz`), no package sets the value, so you must configure it yourself in all versions.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is no package involved here

Suggested change
If you installed {{es}} from an archive (`.tar.gz`), no package sets the value, so you must configure it yourself in all versions.
If you installed {{es}} from an archive (`.tar.gz`), the value is not set, so you must configure it yourself in all versions.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

::::

::::{tab-item} Archive or other installation
If you installed {{es}} from an archive (`.tar.gz`), or on a system that doesn't use systemd, no packaged sysctl file exists, so there's nothing to override your value.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

zip? docker?

This branch was successfully deployed

1 active deployment
docs-preview — a3c798fd Deployed Nov 30, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Internal]: vm.max_map_count persisted in /etc/sysctl.conf is overridden by the packaged sysctl file at boot and on package upgrade

2 participants